import java.util.Scanner;

public class demo1 {
    public static boolean isHui(StringBuilder str) {
        int first =0;
        int last=str.length()-1;
        while(first<=last) {
            if(str.charAt(first)!=str.charAt(last)) {
                return false;
            }
            first++;
            last--;
        }
        return true;
    }
    public static int fun(StringBuilder str1,StringBuilder str2) {
        int count=0;
        int len1=str1.length();
        int len2=str2.length();
        if(len1==0) {
            if(isHui(str2)) {
                return 1;
            }
            return 0;
        }
        for(int i=0;i<=len1;i++) {
            if(isHui(str1.insert(i,str2))) {
                count++;
            }
            str1.delete(i,i+len2);
        }
        return count;
    }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        StringBuilder str1= new StringBuilder(scanner.nextLine());
        StringBuilder str2= new StringBuilder(scanner.nextLine());
        System.out.println(fun(str1,str2));

    }
}

